/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.unirio.ticketnator.action;

import br.unirio.ticketnator.helper.Token;
import com.opensymphony.xwork2.ActionSupport;

/**
 * Classe para gerar um token para recuperacao de senha
 * @author Frade
 */
public class TokenValidate extends ActionSupport {

    private String user, token;

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
    
    //Valida Token fornecido
    public String Validate() {
        if (Token.Validate(user, token)) {
            return SUCCESS;
        } else {
            return ERROR;
        }
    }
}
